\(\int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx\) [1503]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 142 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 (3 a-5 b) (a-b) b \log (1+\sin (c+d x))}{16 d}-\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d} \]

[Out]

-3/16*b*(a+b)*(3*a+5*b)*ln(1-sin(d*x+c))/d+3/16*(3*a-5*b)*(a-b)*b*ln(1+sin(d*x+c))/d-15/8*b^3*sin(d*x+c)/d+1/4
*sec(d*x+c)^4*(a+b*sin(d*x+c))^3/d-1/8*sec(d*x+c)^2*(a+b*sin(d*x+c))^2*(4*a+7*b*sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2916, 12, 1659, 788, 647, 31} \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 b (3 a-5 b) (a-b) \log (\sin (c+d x)+1)}{16 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {15 b^3 \sin (c+d x)}{8 d} \]

[In]

Int[Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3*Tan[c + d*x]^3,x]

[Out]

(-3*b*(a + b)*(3*a + 5*b)*Log[1 - Sin[c + d*x]])/(16*d) + (3*(3*a - 5*b)*(a - b)*b*Log[1 + Sin[c + d*x]])/(16*
d) - (15*b^3*Sin[c + d*x])/(8*d) + (Sec[c + d*x]^4*(a + b*Sin[c + d*x])^3)/(4*d) - (Sec[c + d*x]^2*(a + b*Sin[
c + d*x])^2*(4*a + 7*b*Sin[c + d*x]))/(8*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 788

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[e*g*(x/c), x] + Dist[1
/c, Int[(c*d*f - a*e*g + c*(e*f + d*g)*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x]

Rule 1659

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[(d + e*x)^m*(a + c*x^2)^(p + 1)*((a*g - c*f*x)/(2*a*c*(p + 1))), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b^5 \text {Subst}\left (\int \frac {x^3 (a+x)^3}{b^3 \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {b^2 \text {Subst}\left (\int \frac {x^3 (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}+\frac {\text {Subst}\left (\int \frac {(a+x)^2 \left (-3 b^4-4 a b^2 x-4 b^2 x^2\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}+\frac {\text {Subst}\left (\int \frac {(a+x) \left (9 a b^4+15 b^4 x\right )}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^2 d} \\ & = -\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {\text {Subst}\left (\int \frac {-9 a^2 b^4-15 b^6-24 a b^4 x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^2 d} \\ & = -\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d}-\frac {(3 (3 a-5 b) (a-b) b) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{16 d}+\frac {(3 b (a+b) (3 a+5 b)) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{16 d} \\ & = -\frac {3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))}{16 d}+\frac {3 (3 a-5 b) (a-b) b \log (1+\sin (c+d x))}{16 d}-\frac {15 b^3 \sin (c+d x)}{8 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^3}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x))^2 (4 a+7 b \sin (c+d x))}{8 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.04 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {-3 b (a+b) (3 a+5 b) \log (1-\sin (c+d x))+3 (3 a-5 b) (a-b) b \log (1+\sin (c+d x))+\frac {(a+b)^3}{(-1+\sin (c+d x))^2}+\frac {3 (a+b)^2 (a+3 b)}{-1+\sin (c+d x)}-16 b^3 \sin (c+d x)+\frac {(a-b)^3}{(1+\sin (c+d x))^2}-\frac {3 (a-3 b) (a-b)^2}{1+\sin (c+d x)}}{16 d} \]

[In]

Integrate[Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3*Tan[c + d*x]^3,x]

[Out]

(-3*b*(a + b)*(3*a + 5*b)*Log[1 - Sin[c + d*x]] + 3*(3*a - 5*b)*(a - b)*b*Log[1 + Sin[c + d*x]] + (a + b)^3/(-
1 + Sin[c + d*x])^2 + (3*(a + b)^2*(a + 3*b))/(-1 + Sin[c + d*x]) - 16*b^3*Sin[c + d*x] + (a - b)^3/(1 + Sin[c
 + d*x])^2 - (3*(a - 3*b)*(a - b)^2)/(1 + Sin[c + d*x]))/(16*d)

Maple [A] (verified)

Time = 0.84 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.58

method result size
derivativedivides \(\frac {\frac {a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+3 a^{2} b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a \,b^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(225\)
default \(\frac {\frac {a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 \cos \left (d x +c \right )^{4}}+3 a^{2} b \left (\frac {\sin ^{5}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{5}\left (d x +c \right )}{8 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+3 a \,b^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) \(225\)
parallelrisch \(\frac {48 b^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) a \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-18 b \left (a +\frac {5 b}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a +b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+18 b \left (a -\frac {5 b}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a -b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 \left (-a^{3}-3 a \,b^{2}\right ) \cos \left (2 d x +2 c \right )+\left (a^{3}+9 a \,b^{2}\right ) \cos \left (4 d x +4 c \right )+15 \left (-a^{2} b -b^{3}\right ) \sin \left (3 d x +3 c \right )-2 b^{3} \sin \left (5 d x +5 c \right )+\left (9 a^{2} b -5 b^{3}\right ) \sin \left (d x +c \right )+3 a^{3}+3 a \,b^{2}}{4 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(273\)
risch \(3 i a \,b^{2} x +\frac {i b^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i b^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {6 i b^{2} a c}{d}+\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (8 i a^{3} {\mathrm e}^{5 i \left (d x +c \right )}+48 i a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+15 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+9 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+48 i a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-9 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+8 i a^{3} {\mathrm e}^{i \left (d x +c \right )}+48 i a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}+9 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-15 a^{2} b -9 b^{3}\right )}{4 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2} b}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a \,b^{2}}{d}-\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{3}}{8 d}+\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2} b}{8 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a \,b^{2}}{d}+\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{3}}{8 d}\) \(413\)
norman \(\frac {\frac {\left (4 a^{3}+6 a \,b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (4 a^{3}+6 a \,b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \left (45 a^{2}+11 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {6 a \,b^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {6 a \,b^{2} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (4 a^{3}+16 a \,b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 \left (4 a^{3}+16 a \,b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {3 b \left (3 a^{2}+5 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {b \left (3 a^{2}+5 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {b \left (3 a^{2}+5 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {3 b \left (3 a^{2}+5 b^{2}\right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {b \left (105 a^{2}+47 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {b \left (105 a^{2}+47 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {3 a \,b^{2} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 b \left (3 a^{2}-8 a b +5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}-\frac {3 b \left (3 a^{2}+8 a b +5 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}\) \(466\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*a^3*sin(d*x+c)^4/cos(d*x+c)^4+3*a^2*b*(1/4*sin(d*x+c)^5/cos(d*x+c)^4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/
8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))+3*a*b^2*(1/4*tan(d*x+c)^4-1/2*tan(d*x+c)^2-ln(cos
(d*x+c)))+b^3*(1/4*sin(d*x+c)^7/cos(d*x+c)^4-3/8*sin(d*x+c)^7/cos(d*x+c)^2-3/8*sin(d*x+c)^5-5/8*sin(d*x+c)^3-1
5/8*sin(d*x+c)+15/8*ln(sec(d*x+c)+tan(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.24 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, a^{3} + 12 \, a b^{2} - 8 \, {\left (a^{3} + 6 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (8 \, b^{3} \cos \left (d x + c\right )^{4} - 6 \, a^{2} b - 2 \, b^{3} + 3 \, {\left (5 \, a^{2} b + 3 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/16*(3*(3*a^2*b - 8*a*b^2 + 5*b^3)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(3*a^2*b + 8*a*b^2 + 5*b^3)*cos(d
*x + c)^4*log(-sin(d*x + c) + 1) + 4*a^3 + 12*a*b^2 - 8*(a^3 + 6*a*b^2)*cos(d*x + c)^2 - 2*(8*b^3*cos(d*x + c)
^4 - 6*a^2*b - 2*b^3 + 3*(5*a^2*b + 3*b^3)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**3*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.22 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {16 \, b^{3} \sin \left (d x + c\right ) - 3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (3 \, {\left (5 \, a^{2} b + 3 \, b^{3}\right )} \sin \left (d x + c\right )^{3} - 2 \, a^{3} - 18 \, a b^{2} + 4 \, {\left (a^{3} + 6 \, a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (9 \, a^{2} b + 7 \, b^{3}\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/16*(16*b^3*sin(d*x + c) - 3*(3*a^2*b - 8*a*b^2 + 5*b^3)*log(sin(d*x + c) + 1) + 3*(3*a^2*b + 8*a*b^2 + 5*b^
3)*log(sin(d*x + c) - 1) - 2*(3*(5*a^2*b + 3*b^3)*sin(d*x + c)^3 - 2*a^3 - 18*a*b^2 + 4*(a^3 + 6*a*b^2)*sin(d*
x + c)^2 - (9*a^2*b + 7*b^3)*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.32 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=-\frac {16 \, b^{3} \sin \left (d x + c\right ) - 3 \, {\left (3 \, a^{2} b - 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 3 \, {\left (3 \, a^{2} b + 8 \, a b^{2} + 5 \, b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (18 \, a b^{2} \sin \left (d x + c\right )^{4} + 15 \, a^{2} b \sin \left (d x + c\right )^{3} + 9 \, b^{3} \sin \left (d x + c\right )^{3} + 4 \, a^{3} \sin \left (d x + c\right )^{2} - 12 \, a b^{2} \sin \left (d x + c\right )^{2} - 9 \, a^{2} b \sin \left (d x + c\right ) - 7 \, b^{3} \sin \left (d x + c\right ) - 2 \, a^{3}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^3*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/16*(16*b^3*sin(d*x + c) - 3*(3*a^2*b - 8*a*b^2 + 5*b^3)*log(abs(sin(d*x + c) + 1)) + 3*(3*a^2*b + 8*a*b^2 +
 5*b^3)*log(abs(sin(d*x + c) - 1)) - 2*(18*a*b^2*sin(d*x + c)^4 + 15*a^2*b*sin(d*x + c)^3 + 9*b^3*sin(d*x + c)
^3 + 4*a^3*sin(d*x + c)^2 - 12*a*b^2*sin(d*x + c)^2 - 9*a^2*b*sin(d*x + c) - 7*b^3*sin(d*x + c) - 2*a^3)/(sin(
d*x + c)^2 - 1)^2)/d

Mupad [B] (verification not implemented)

Time = 11.94 (sec) , antiderivative size = 356, normalized size of antiderivative = 2.51 \[ \int \sec ^2(c+d x) (a+b \sin (c+d x))^3 \tan ^3(c+d x) \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,a^3+18\,a\,b^2\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {9\,a^2\,b}{4}+\frac {15\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,a^3+18\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (6\,a^2\,b+10\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (6\,a^2\,b+10\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {9\,a^2\,b}{4}+\frac {15\,b^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {33\,a^2\,b}{2}-\frac {9\,b^3}{2}\right )-6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,a\,b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {3\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a+b\right )\,\left (3\,a+5\,b\right )}{8\,d}+\frac {3\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a-b\right )\,\left (3\,a-5\,b\right )}{8\,d} \]

[In]

int((sin(c + d*x)^3*(a + b*sin(c + d*x))^3)/cos(c + d*x)^5,x)

[Out]

(tan(c/2 + (d*x)/2)^4*(18*a*b^2 + 4*a^3) - tan(c/2 + (d*x)/2)*((9*a^2*b)/4 + (15*b^3)/4) + tan(c/2 + (d*x)/2)^
6*(18*a*b^2 + 4*a^3) + tan(c/2 + (d*x)/2)^3*(6*a^2*b + 10*b^3) + tan(c/2 + (d*x)/2)^7*(6*a^2*b + 10*b^3) - tan
(c/2 + (d*x)/2)^9*((9*a^2*b)/4 + (15*b^3)/4) + tan(c/2 + (d*x)/2)^5*((33*a^2*b)/2 - (9*b^3)/2) - 6*a*b^2*tan(c
/2 + (d*x)/2)^2 - 6*a*b^2*tan(c/2 + (d*x)/2)^8)/(d*(2*tan(c/2 + (d*x)/2)^4 - 3*tan(c/2 + (d*x)/2)^2 + 2*tan(c/
2 + (d*x)/2)^6 - 3*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 + 1)) + (3*a*b^2*log(tan(c/2 + (d*x)/2)^2 + 1)
)/d - (3*b*log(tan(c/2 + (d*x)/2) - 1)*(a + b)*(3*a + 5*b))/(8*d) + (3*b*log(tan(c/2 + (d*x)/2) + 1)*(a - b)*(
3*a - 5*b))/(8*d)